package com.baidu.Chapter02;

import java.util.Scanner;

public class ex2_22 {
    public static void main(String[] args) {
        System.out.print("Enter an amount for example 1156：");
        Scanner sc=new Scanner(System.in);
        int amount = sc.nextInt();
        int numberOfOneDollars = amount / 100;  //美元
        int numberOfPennies = amount % 100; //美分
        System.out.println( "Your amount " + amount + " consist of \n" +
                "\t" + numberOfOneDollars + " dollars\n" +
                "\t" + numberOfPennies + " pennies");
    }
}
